<script setup lang="ts">
import { onLaunch, onShow, onHide, onLoad } from "@dcloudio/uni-app";
import { ref, provide } from "vue";
import { useMemberStore } from "./stroes/modules/member";
const memberStore = useMemberStore();

onLaunch(() => {
  console.log("App Launch");
});
onShow(async () => {
  console.log("App Show");
  memberStore.checkTokenExpired();
});
onHide(() => {
  console.log("App Hide");
});

// 获取系统信息
const windowWidth = ref(0);
const windowHeight = ref(0);

uni.getSystemInfo({
  success: (e) => {
    console.log("系统信息:", e);
    windowWidth.value = e.windowWidth;
    windowHeight.value = e.windowHeight;
  },
});

// 提供给所有子组件
provide("windowWidth", windowWidth);
provide("windowHeight", windowHeight);
</script>
<style lang="scss">
// @import "@/styles/fonts.scss";
.custom-title-style {
  color: #fff;
  font-weight: 500;
}
.loading-more {
  text-align: center;
  padding: 30rpx 0;
  font-size: 28rpx;
  color: #999;
}

.no-more-data {
  text-align: center;
  padding: 30rpx 0;
  font-size: 28rpx;
  color: #ccc;
}
</style>
